<template>
	<view class="content">
		<!-- <view class="header">
			<view class="images" @click="back">
				<img src="../../static/images/zuojiantou.png" alt="" srcset="" style="width: 15rpx;height: 30rpx;">
			</view>
			<view class="text">
				百事收
			</view>

		</view> -->
		<view class="image">
			<img src="../../static/images/one.jpg" alt="" srcset="">
		</view>
		<main>
			<view class="flex">
				<view class="img" @click="call" style="width: 33.3%;">
					<!-- <navigator  url="/pagesA/call-center/call-center" open-type="navigate"> -->
					<img src="../../static/images/eghit.png" alt="" srcset="">
					<view class="text">
						呼叫回收
					</view>
					<!-- </navigator> -->
				</view>
				<view class="img" style="width: 33.3%;">
					<navigator url="../../pagesA/nearby-branches/nearby-branches" >
						<img src="../../static/images/seven.png" alt="" srcset="">
						<view class="text">
							附近网点
						</view>
					</navigator>
				</view>
				<view class="img" style="width: 33.3%;">
					<navigator url="../../pagesA/shiyong/shiyong">
						<img src="../../static/images/aaaa.png" alt="" srcset="">
						<view class="text">
							用户指南
						</view>
					</navigator>
				</view>
				<!-- <view class="img">
					<navigator url="/pagesA/order-record/order-record" open-type="navigate">
						<img src="../../static/images/three.png" alt="" srcset="">
						<view class="text">
							订单记录
						</view>
					</navigator>
				</view> -->
				<!-- <view class="img">
					<navigator url="/pagesA/integral/score" open-type="navigate">
						<img src="../../static/images/four.png" alt="" srcset="">
						<view class="text">
							积分
						</view>
					</navigator>
				</view> -->
				<!-- <view class="img">
					<navigator url="/pagesA/bill/bill" open-type="navigate">
						<img src="../../static/images/two.png" alt="" srcset="">
						<view class="text">
							账单
						</view>
					</navigator>
				</view> -->
			</view>
			<view class="two flex">
				<!-- <view class="img">
					<navigator url="/pagesA/qr-code/qr-code" open-type="navigate">
						<img src="../../static/images/five.png" alt="" srcset="">
						<view class="text">
							二维码
						</view>
					</navigator>
				</view> -->
				<view class="img" style="width: 33.3%;">
					<navigator url="/pagesA/order-record/order-record" open-type="navigate">
						<img src="../../static/images/three.png" alt="" srcset="">
						<view class="text">
							订单记录
						</view>
					</navigator>
				</view>
				<view class="img" style="width: 33.3%;">
					<navigator url="/pagesA/integral/score" open-type="navigate">
						<img src="../../static/images/score.png" alt="" srcset="">
						<view class="text">
							积分
						</view>
					</navigator>
				</view>
				<view class="img" style="width: 33.3%;">
					<navigator url="/pagesA/bill/bill" open-type="navigate">
						<img src="../../static/images/two.png" alt="" srcset="">
						<view class="text">
							账单
						</view>
					</navigator>
				</view>
				<!-- <view class="img">
					<navigator url="../../pagesA/address-management/address-management">
						<img src="../../static/images/six.png" alt="" srcset="">
						<view class="text">
							地址管理
						</view>
					</navigator>
				</view> -->
				<!-- <view class="img">
					<navigator url="../../pagesA/nearby-branches/nearby-branches">
						<img src="../../static/images/seven.png" alt="" srcset="">
						<view class="text">
							附近网点
						</view>
					</navigator>
				</view> -->
				<!-- <view class="img">
					<navigator url="../../pagesA/shiyong/shiyong">
						<img src="../../static/images/aaaa.png" alt="" srcset="">
						<view class="text">
							用户指南
						</view>
					</navigator>
				</view> -->
			</view>
			<view class="two flex1">
				<view class="img" style="">
					<navigator url="/pagesA/qr-code/qr-code" open-type="navigate">
						<img src="../../static/images/five.png" alt="" srcset="">
						<view class="text">
							我的二维码
						</view>
					</navigator>
				</view>
				<!-- <view class="img" style="width: 30%;margin-right: 155rpx;">
					<navigator url="../../pagesA/address-management/address-management">
						<img src="../../static/images/six.png" alt="" srcset="">
						<view class="text">
							我的地址
						</view>
					</navigator>
				</view> -->
				<view class="img" style="">
					<navigator url="../../pagesA/address-management/address-management">
						<img src="../../static/images/six.png" alt="" srcset="">
						<view class="text">
							我的地址
						</view>
					</navigator>
				</view>
				<view class="img" style="">
					<navigator url="../../pagesA/bill/data">
						<img src="../../static/images/data.png" alt="" srcset="">
						<view class="text">
							分类数据
						</view>
					</navigator>
				</view>
			</view>
			<view class="two flex1">
				<view class="img" style="">
					<navigator url="../../pagesA/bill/inspectionRecords" open-type="navigate">
						<img src="../../static/images/aaaa.png" alt="" srcset="">
						<view class="text">
							巡检记录
						</view>
					</navigator>
				</view>
			</view>
		</main>
	</view>
</template>
<script>
	import vConsole from "../../static/js/vconsole.min"
	// import '../../static/js/ihgAppJssdk.js'
	export default {
		data() {
			return {
				// vConsole: new vConsole()
			}
		},

		methods: {
			// goNearby(){
			// 	uni.reLaunch({
			// 		url: '../../pagesA/nearby-branches/nearby-branches'
			// 	});

			// },
			init() {

			},
			back() {
				uni.navigateBack({
					delta: 1
				})
			},
			call() {
				uni.navigateTo({
					//保留当前页面，跳转到应用内的某个页面
					url: '/pagesA/call-center/call-center'
				})
				uni.removeStorageSync('addressInfo');
				uni.removeStorageSync('recycleSiteInfo');
			}
		},
		mounted() {
			// uni.setStorageSync('Authorization',
			// 	'eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiI1NzEwMDA2ODQ2MCIsIm5hbWUiOiLpu4RzaXIiLCJja3VzaSI6IjU2MDQ5MDNmM2Y0MjQ4MTlhNmRhMWNjZTY0MDk5NDZkIiwibW9iaWxlUGhvbmUiOiIxNTk5NTA2MDk1NyIsImV4cCI6MTcxMzkyMTI5N30.btUgcc3bwYFfqYocR8H7kIAxYTy91o7gOklXcbJiCY8'
			// ); //token

			let token = uni.getStorageSync('Authorization')
			if (token) {
			} else {
				ihgAppJssdk.user.getoToken({
					appId: "HG_GYL_MFP",
					success: function(data) {
						var encryption = data.data
						uni.request({
							url: 'http://121.40.93.39:8903/api/ihg/getUser',
							method: 'post',
							data: {
								"oToken": encryption
							},
							success: function(res) {
								var userInfo = res.data.data.user;
								uni.setStorageSync('cardNo', userInfo.id); //卡号id
								uni.setStorageSync('integral', userInfo.integral); //用户积分
								uni.setStorageSync('Authorization', res.data.data.token); //token
							},
							fail: function(res) {
							}
						})
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.content {
		width: 100vw;
		height: 100vh;
		background-color: #F1F4F9;
		.header {
			display: flex;
			// width: 445rpx;
			padding-right: 330rpx;
			height: 88rpx;
			line-height: 88rpx;
			background: #FFFFFF;
			justify-content: space-between;

			.images img {
				padding-left: 24rpx;
			}

			.text {
				height: 35rpx;
				font-size: 36rpx;
				font-family: Source Han Sans SC;
				font-weight: bold;
				color: #000000;
				line-height: 88rpx;
				opacity: 0.85;
			}
		}

		.top-text {
			width: 750rpx;
			height: 88rpx;
			// padding-top: 88rpx;
			background: #FFFFFF;
			text-align: center;
			line-height: 88rpx;
			font-size: 40rpx;
			font-family: Source Han Sans SC;
			font-weight: bold;
			color: #343434;
		}

		.image {
			width: 702rpx;
			height: 250rpx;
			margin: 24rpx 24rpx 0 24rpx;

			img {
				width: 702rpx;
				height: 250rpx;
			}
		}

		main {
			// width: 630rpx;
			padding: 60rpx 60rpx;

			.flex {
				display: flex;
				justify-content: space-between;
				text-align: center;
			}

			.img {

				img {
					width: 90rpx;
					height: 90rpx;
				}

				.text {
					// width: 96rpx;
					height: 22rpx;
					font-size: 32rpx;
					font-family: Source Han Sans SC;
					font-weight: 400;
					color: #000000;
					line-height: 35rpx;
					opacity: 0.85;
					margin-top: 16rpx;
				}
			}

			.two {
				margin-top: 44rpx;
			}
		}
	}

	.flex1 {
		display: flex;
		justify-content: space-between;
		text-align: center;
		.img{
			width: 33.3%;
		}
	}
</style>